Script: put empty into saveTo¬get wsGet(wdID,"6","Text")¬if it is "TRUE" then¬ put wsGet(wdID,"7","Text") into saveTo¬ put wsGet(wdID,"1","Text") into fld saveTo¬end if¬¬¬¬
ItemType: PUSH
Rect: 295,75,375,95
Name: Cancel
CancelItem: TRUE
AutoClose: TRUE
ItemType: PUSH
Rect: 295,43,375,63
Name: Delete
Script: put empty into theList¬put empty into theSelect¬put wsGet(wdID,"1","Text") into theList¬put wsGet(wdID,"1","SelectionText") into theSelect¬if theSelect ≠ empty then¬ repeat with x=1 to the number of lines in theList¬ if line x of theList = theSelect then¬ delete line x of theList¬ exit repeat¬ end if¬ end repeat¬ wsSet wdID,"1","Text", theList¬ wsSet wdID,"6","Text", "TRUE"¬end if¬¬
ItemType: PUSH
Rect: 295,11,375,31
Name: Add
Script: ask "What would you like to add to the list?"¬put empty into tmp¬put empty into theList¬put it into tmp¬if tmp ≠ empty then¬ put wsGet(wdID,"1","Text") into theList¬ put tmp&return before theList¬ put stripDup(theList) into theList¬ put FullSort(theList,"t=u","d=a") into theList¬ wsSet wdID,"1","Text", theList¬ wsSet wdID,"6","Text", "TRUE"¬end if¬